<div id="pageoptions">
    
    <% if controller.action_name == "study_story_words" %>
        <%= link_to "< back to story word list", {# link_to options
                    :controller => 'word',
                    :action => 'from_story',
                    :id => @story.id } %>
    <% end %> 
    
    <% if controller.action_name == "study" %>
        <%= link_to "< back to word list", {
                    :controller => 'word'} %>
    <% end %>
    
    <% if controller.action_name == "index" %>
        <%= link_to "study all words", {
                    :controller => 'word',
                    :action => 'study'} %>
    <% end %>
    
</div>